<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="contact/bootstrap.min.css" />
<link rel="stylesheet" href="contact/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="contact/uniform.css" />
<link rel="stylesheet" href="contact/select2.css" />
<link rel="stylesheet" href="contact/unicorn.main.css" />
<link rel="stylesheet" href="contact/unicorn.grey.css" class="skin-color" />
<link rel="stylesheet" href="contact/editContact.css" type="text/css" />

<script language="JavaScript">

		
sortitems = 1;  // Automatically sort items within lists? (1 or 0)

function move(fbox,tbox) {
for(var i=0; i<fbox.options.length; i++) {
	if(fbox.options[i].selected && fbox.options[i].value != "") {
		var no = new Option();
		no.value = fbox.options[i].value;
		no.text = fbox.options[i].text;
		tbox.options[tbox.options.length] = no;
		
		fbox.options[i].value = "";
		fbox.options[i].text = "";
		
	}
}

BumpUp(fbox);
if (sortitems) SortD(tbox);
}
function BumpUp(box)  {
for(var i=0; i<box.options.length; i++) {
if(box.options[i].value == "")  {
for(var j=i; j<box.options.length-1; j++)  {
box.options[j].value = box.options[j+1].value;
box.options[j].text = box.options[j+1].text;
}
var ln = i;
break;
   }
}
if(ln < box.options.length)  {
box.options.length -= 1;
BumpUp(box);
   }
}

function SortD(box)  {
var temp_opts = new Array();
var temp = new Object();
for(var i=0; i<box.options.length; i++)  {
temp_opts[i] = box.options[i];
}
for(var x=0; x<temp_opts.length-1; x++)  {
for(var y=(x+1); y<temp_opts.length; y++)  {
if(temp_opts[x].text > temp_opts[y].text)  {
temp = temp_opts[x].text;
temp_opts[x].text = temp_opts[y].text;
temp_opts[y].text = temp;
temp = temp_opts[x].value;
temp_opts[x].value = temp_opts[y].value;
temp_opts[y].value = temp;
      }
   }
}
for(var i=0; i<box.options.length; i++)  {
box.options[i].value = temp_opts[i].value;
box.options[i].text = temp_opts[i].text;
   }
}
</script>


</head>
<body>
<div class="container-fluid"  align="center" style="width:90%;">
  <div class="row-fluid" style="width:100%">
    <div class="span12">
      <div class="widget-box">
        <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
          <h5></h5>
        </div>
        <div class="widget-content nopadding" style="display:block;">
          <p>
          <div align="center">
            <form action="file://jquery_dialog/serverPost1.html">
              <table width="100%"  border="0" cellpadding="0" cellspacing="0"  >
                <tr align="center"   >
                  <td width="18%"   align="right"><label >组名</label></td>
                  <td width="82%"  align="left"><input  align="left" type="text"  class="txt" value="请输入联系组的名字" id="GrpName" name="GrpName" size="10" 
				     
					onfocus="if(this.value=='请输入联系组的名字'){this.value='';this.style.cssText=''; }" 
					onblur="if(this.value==''){this.value='请输入联系组的名字';this.style.cssText='color: rgb(160,160,160)'; '';}" 
					style="color:rgb(160, 160, 160); "   >
                  </td>
                </tr>
              </table>
            </form>
            <p>
			<form action="" method="post">
            <table border="0">
              <tbody>
                <tr>
                  <th><label>所有联系人</label></th>
                  <th>&nbsp;</th>
                  <th><label>已添加</label></th>
                </tr>
                <tr>
                  <td  ><select multiple="multiple" size="12" name="list1" style="width:130px">
                      <option value="11">王韩月</option>
                      <option value="12">王璨</option>
                      <option value="13">姜铎</option>
                      <option value="14">杨博</option>
                      <option value="15">黄欢</option>
                      <option value="21">张舒捷</option>
                      <option value="22">周桐</option>
                      <option value="31">张三</option>
                      <option value="32">李四</option>
                      <option value="33">王五</option>
                    </select>
                  </td>
                  <td><input onclick="move(this.form.list1,this.form.list2)" type="button" name="B1" value=" >> " />
                    <br />
                    <input type="button" onclick="move(this.form.list2,this.form.list1)" name="B2" value=" << " />
                  </td>
                  <td><select multiple="multiple" size="12" name="list2" style="width:130px" >
                      <option value="41">崔亚通</option>
                      <option value="42">阮梦驰</option>
                    </select>
                  </td>
                </tr>
              </tbody>
            </table>
			</form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
